home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1997 May / PC Shareware 1997-05.iso / gry / kungfu / kfk.exe / KFKLVL9.DXR / 00036_MERCURY Parent.ls < prev    next >
Encoding:
Text File  |  1997-02-16  |  1.5 KB  |  41 lines

  1. property ancestor, velocityH, velocityV, mySprite, direction, MyVulnerability, myID, damageValue, scoreValue, HMovementList, VMovementList, type, MyColor
  2. global plutoHlist, plutoVlist, uranusHlist, uranusVlist, saturnHlist, saturnVlist, jupiterHlist, jupiterVlist, marsHlist, marsVlist, earthHlist, earthVlist, venusHlist, venusVlist, mercuryHlist, mercuryVlist
  3.  
  4. on birth me, ID
  5.   set myID to ID
  6.   set myID to ID
  7.   set damageValue to 1
  8.   set scoreValue to 100
  9.   set myExplosionType to EMPTY
  10.   set nowExploding to 0
  11.   set foundOne to 0
  12.   repeat with currentchannel = 15 to 48
  13.     if the visible of sprite currentchannel = 0 then
  14.       set mySprite to currentchannel
  15.       set the visible of sprite currentchannel to 1
  16.       set foundOne to 1
  17.       exit repeat
  18.     end if
  19.   end repeat
  20.   set previousflag to 0
  21.   set HMovementList to mercuryHlist
  22.   set VMovementList to mercuryVlist
  23.   set type to #Path
  24.   set the castNum of sprite mySprite to the number of cast "MERCURY"
  25.   set MyColor to #None
  26.   set the locH of sprite mySprite to getAt(HMovementList, 1)
  27.   set the locV of sprite mySprite to getAt(VMovementList, 1)
  28.   set direction to -1
  29.   set MyVulnerability to #left
  30.   set velocityH to 0
  31.   set velocityV to 0
  32.   if foundOne = 1 then
  33.     set ancestor to birth(script "PLANET Nasty ancestor", velocityH, velocityV, mySprite, MyVulnerability, myID, damageValue, scoreValue, HMovementList, VMovementList, type, MyColor)
  34.     return me
  35.   else
  36.     if foundOne = 0 then
  37.       deleteProp(nastyList, myID)
  38.     end if
  39.   end if
  40. end
  41.